//
//  ByteBufferReader.h
//  ByteBuf
//
//  Created by 周最新 on 15/8/29.
//  Copyright (c) 2015年 zzx. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ByteBufferReader : NSObject

@property (nonatomic) uint16_t position;
@property (strong, nonatomic, readonly) NSData *data;

- (instancetype)initWithData:(NSData *)data;

- (char)readByte;
- (NSData *)readBytes:(uint16_t)length;

- (uint16_t)readUInt16;
- (uint32_t)readUInt32;

@end
